#pragma once
#include "streams.h"

class VideoFilter :
	public CTransInPlaceFilter
{
public:
	VideoFilter(HRESULT *phr, bool hFlip);
	HRESULT Transform(IMediaSample *pSample);
	HRESULT CheckInputType(const CMediaType* mtIn);
	HRESULT SetMediaType(PIN_DIRECTION direction,const CMediaType *pmt);

	void StartQueryBuffer(BYTE *buf, int bufLen);
	BYTE *GetBuffer(int &bufLen);

	GUID GetVideoType() {return videoType;}
	int GetVideoWidth() {return videoWidth;}
	int GetVideoHeight() {return videoHeight;}
private:
	volatile bool queryBuffer;
	BYTE *buf;
	int bufLen;
	bool hFlip;
	
	GUID videoType;
	int videoWidth, videoHeight;

};
